package com.shao.discovery;

import com.shao.channelHandler.ConsumerChannelInitializer;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;

/**
 * @author PaoFu
 * @version 1.0
 * @data 2025/4/11 14:51
 */
@Slf4j
public class NettyBootstrapInitializer {

    @Getter
    private static final Bootstrap bootstrap = new Bootstrap();

    static {
        NioEventLoopGroup group = new NioEventLoopGroup();
        bootstrap.group(group)
                .channel(NioSocketChannel.class)
                // 初始化管道
                .handler(new ConsumerChannelInitializer());
    }

    private NettyBootstrapInitializer() {
    }
}
